package com.beiing.tianshuai.tianshuai.util;

import android.util.Log;

import com.beiing.tianshuai.tianshuai.app.AppConstant;
import com.orhanobut.logger.Logger;

/**
 * Created by Jinni on 2017/7/10 0010.
 */

public class LogUtils {

    /**
     * isDebug 发布版本时修改为false
     */
    private static boolean isDebug = AppConstant.IS_DEBUG;

    public static void e(String msg, String tag) {
        if (isDebug) {
            Logger.e(msg, tag);
        }
    }

    public static void e(Throwable throwable,String msg, String tag) {
        if (isDebug) {
            Logger.e(throwable, msg, tag);
        }
    }


    public static void i(String msg, String tag) {
        if (isDebug) {
            Log.i(tag, msg);
        }
    }

    public static void d(String msg, String tag) {
        if (isDebug) {
            Log.d(tag, msg);
        }
    }

    public static void json(String json) {
        if (isDebug) {
            Logger.json(json);
        }
    }
}
